﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace Abhiruchi_Phase1.BAL_DAL.HRM_DAL
{
    class ORG_Emp_TaskMappingDAL
    {
        public static SqlConnection myCon = new SqlConnection(App.ConnectionString);
        public static SqlCommand myCom;
        public static DataTable LoadAllEmpDataFromDB(int type)
        {
            SqlCommand myCom = LoadSp();
            myCom.Parameters.AddWithValue("@int_ProcessType", type);
            DataTable myDt = new DataTable();

            SqlDataAdapter myda = new SqlDataAdapter(myCom);
            myda.Fill(myDt);
            return myDt;
        }
        private static SqlCommand LoadSp()
        {
            SqlCommand myCom = new SqlCommand();
            myCom.Connection = myCon;
            myCom.CommandText = "sp_HRM_Get_Set_PE_CE_SearchEmployee";
            myCom.CommandType = CommandType.StoredProcedure;
            return myCom;
        }
    }
}
